/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef FILE_SHARE_H
#define FILE_SHARE_H

#include <string>
#include <vector>
#include "accesstoken_kit.h"
#include "hap_token_info.h"

namespace OHOS {
namespace AppFileService {
namespace ModuleFileShare {
using namespace std;

namespace {
const string SCHEME = "file";
const string PATH_SYMBOLS = "/data/storage/";
const string FRAGMENT_SYMBOLS = "/data";
const string DOUBLE_SLASH_SYMBOLS = "//";
const string PATH_SEPARATOR = "/";
const string PACKAGENAME = "<PackageName>";
const string CURRENTUSERID = "<currentUserId>";
const string REAL_DATA_PATH = "/data/app/el2";

string sandBoxPath[] = {"/data/storage/el1/bundle",
                        "/data/storage/el2/base",
                        "/data/storage/el1/database",
                        "/data/storage/el2/database",
                        "/data/storage/el1/base",
                        "/data/storage/el2/distributedfiles",
                        "/data/storage/el2/auth_groups",
                        "/data/storage/ark-cache",
                        "/data/storage/ark-profile"
                        };

std::string srcPath[] = {"/data/app/el1/bundle/public/<PackageName>",
                         "/data/app/el2/<currentUserId>/base/<PackageName>",
                         "/data/app/el1/<currentUserId>/database/<PackageName>",
                         "/data/app/el2/<currentUserId>/database/<PackageName>",
                         "/data/app/el1/<currentUserId>/base/<PackageName>",
                         "/mnt/hmdfs/<currentUserId>/account/merge_view/data/<PackageName>",
                         "/mnt/hmdfs/<currentUserId>/non_account/merge_view/data/",
                         "/data/local/ark-cache/<PackageName>",
                         "/data/local/ark-profile/<currentUserId>/<PackageName>"
                         };
}
class FileShare {
public:
    FileShare() {}
    static int CreateShareFile(const string &uri, Security::AccessToken::AccessTokenID tokenID, int flag);
    static int DeleteShareFile(const string &uri, Security::AccessToken::AccessTokenID tokenID, int flag);
    ~FileShare() {}
};
} // namespace ModuleFileShare
} // namespace AppFileService
} // namespace OHOS

#endif